import axios from '~/axios'

export function getUserList(page,pageSize,Name,Username){
    return axios.post("/sys/user/getUserList",{
        page,
        pageSize,
        Name,
        Username
    })
}

export function getUserDetail(id){
    return axios.post("/sys/user/getListUserInfo",{
        id
    })
}

export function getRoles(){
    return axios.post("/sys/role/getRoles")
}

export function createUser(register){
    return axios.post("/sys/user/create",register)
}

export function saveUser(saveData){
    return axios.put("/sys/user/setUserInfo",saveData)
}

export function getInfo(){
    return axios.post("/sys/user/getUserInfo")
}

export function deleteUser(id){
    return axios.post("/sys/user/deleteUser",{
        id
    })
}